<!-- components/CustomTabbar.vue -->
<template>
  <u-tabbar 
    :value="current" 
    :fixed="true" 
    :placeholder="true"
    :activeColor="activeColor"
    :inactiveColor="inactiveColor"
  >
    <u-tabbar-item 
      v-for="(item, index) in list"
      :key="index"
      :text="item.text"
      :icon="item.icon"
    ></u-tabbar-item>
  </u-tabbar>
</template>

<script setup>
	defineProps({
	  list: {
		type: Array,
		default: () => [
		  { text: '商城首页', icon: 'home' },
		  { text: '积分专区', icon: 'integral' },
		  { text: '我的数据', icon: 'account' }
		]
	  },
	  current: Number,
	  activeColor: {
		type: String,
		default: '#e4393c'
	  },
	  inactiveColor: {
		type: String,
		default: '#909399'
	  }
	})
</script>